@echo off
setlocal

:: Prompt for version number
set /p version=Enter the version number (e.g., 0.6):

:: Build Docker image
docker build -t asia360pc -f .\Dockerfile .
if errorlevel 1 (
    echo Docker build failed.
    pause
    exit /b 1
)

:: Tag Docker image
docker tag asia360pc:latest reg.grawav.cn:24515/asia360/pc:v%version%
if errorlevel 1 (
    echo Docker tag failed.
    pause
    exit /b 1
)

:: Login to Docker registry
docker login -u asia360 -p Asia360123456 https://reg.grawav.cn:24515/
if errorlevel 1 (
    echo Docker login failed.
    pause
    exit /b 1
)

:: Push Docker image to registry
docker push reg.grawav.cn:24515/asia360/pc:v%version%
if errorlevel 1 (
    echo Docker push failed.
    pause
    exit /b 1
)

:: Notify completion
echo Deployment completed successfully.
pause

endlocal
exit /b 0
